CN110555017A - block chain data cleaning method and device, computer equipment and storage medium - Google Patents

block chain data cleaning method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110555017A
CN110555017A CN201910675346.4A CN201910675346A CN110555017A CN 110555017 A CN110555017 A CN 110555017A CN 201910675346 A CN201910675346 A CN 201910675346A CN 110555017 A CN110555017 A CN 110555017A
Authority
CN
China
Prior art keywords
data
node
cleaned
channel
configuration information
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.)
Pending
Application number
CN201910675346.4A
Other languages
Chinese (zh)
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910675346.4A priority Critical patent/CN110555017A/en
Priority to PCT/CN2019/121472 priority patent/WO2021012562A1/en
Publication of CN110555017A publication Critical patent/CN110555017A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources

Abstract

the present application relates to the field of blockchain technologies, and in particular, to a method and an apparatus for clearing blockchain data, a computer device, and a storage medium. The method comprises the following steps: stopping each node in the block chain and the associated service corresponding to each node; acquiring a sorting identifier, acquiring sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction; logging in a node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted; according to the channel replacing instruction, a replacing channel is newly built, and the replacing channel is added to the node to be cleaned; and acquiring first configuration information of the replacement channel, inquiring the resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information, and starting the resource exchange server. By adopting the method, the data in the block chain can be cleaned, so that the operation efficiency of the block chain is improved.

Description

Block chain data cleaning method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and an apparatus for cleaning blockchain data, a computer device, and a storage medium.
Background
In recent years, with the development of blockchain technology, the application of blockchain technology is gradually deepened into various fields in life. In the block chain technology, the reliability of information communication between participants is ensured by forming a consensus process in a network composed of all the participants, and the integrity of the block chain can be ensured by preventing an illegal action such as tampering or repeated consumption in the entire system.
however, in the current running process of the block chain, a large amount of useless test data can be left for data test or other reasons, it is very difficult to clean the test data left in the block chain along with the development of time, but if the test data is not cleaned, the running efficiency of the block chain is gradually reduced along with the increase of the data.
Disclosure of Invention
in view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for clearing data in a blockchain, so as to improve the efficiency of blockchain operation.
a method of blockchain data scrubbing, the method comprising:
stopping each node in the block chain and the associated service corresponding to each node;
Acquiring a sorting identifier, acquiring a sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction when the data queue is deleted;
Logging in a node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted;
According to the channel replacing instruction, a replacing channel is newly built, and the replacing channel is added to the node to be cleaned;
and acquiring first configuration information of the replacement channel, inquiring a resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information, and starting the resource exchange server.
In one embodiment, before deleting the data to be cleaned in the node to be cleaned, the method further includes:
When calibration data exists in the to-be-cleaned data in the to-be-cleaned node, the calibration data in the to-be-cleaned node is backed up, and when a data inspection request is received, the to-be-cleaned data in the to-be-cleaned node is restored according to the backed-up calibration data.
In one embodiment, after the obtaining the first configuration information of the replacement channel and querying the resource exchange server, the method further includes:
Acquiring second configuration information of a history channel in a history record, and matching the second configuration information with the first configuration information;
and when the matching is successful, starting the resource exchange server.
In one embodiment, the stopping of each node in the blockchain and the associated service corresponding to each node includes:
receiving a data cleaning instruction sent by a terminal, wherein the data cleaning instruction comprises a terminal identifier;
acquiring a clearing authority terminal set, and detecting whether the terminal identification is matched with the terminal identification in the clearing authority terminal set;
And when the terminal identification is matched with the terminal identification in the clearing authority terminal set, stopping each node in the block chain and the associated service corresponding to each node.
In one embodiment, the stopping of each node in the blockchain and the associated service corresponding to each node includes:
Acquiring the data volume of the data to be cleaned, and judging whether the data volume of the data to be cleaned is larger than a preset value or not;
And when the data volume of the data to be cleaned is larger than a preset value, stopping each node in the block chain and the associated service corresponding to each node.
A blockchain data scrubbing apparatus, the apparatus comprising:
The stopping module is used for stopping each node in the block chain and the associated service corresponding to each node;
The first acquisition module is used for acquiring a sorting identifier, acquiring sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction when the data queue is deleted;
the login module is used for logging in the node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted;
A channel building module, configured to build a replacement channel according to the channel replacement instruction, and add the replacement channel to the node to be cleaned;
and the second acquisition module is used for acquiring the first configuration information of the replacement channel, inquiring the resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information and starting the resource exchange server.
In one embodiment, the apparatus further comprises:
The backup module is used for backing up the calibration data in the nodes to be cleaned when the calibration data exists in the data to be cleaned in the nodes to be cleaned, and restoring the data to be cleaned in the nodes to be cleaned according to the backed-up calibration data when a data inspection request is received.
In one embodiment, the apparatus further comprises:
The third acquisition module is used for acquiring second configuration information of a historical channel in a historical record and matching the second configuration information with the first configuration information;
and the starting module is used for starting the resource exchange server when the matching is successful.
a computer device comprising a memory storing a computer program and a processor implementing the steps of the above method when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
the block chain data cleaning method, the block chain data cleaning device, the computer equipment and the storage medium stop each node in the block chain and the associated service corresponding to each node; when each node and service in the block chain stop, acquiring a sequencing identifier, acquiring sequencing service from the associated service according to the sequencing identifier, deleting a data queue in the sequencing service, and generating a data cleaning instruction when the data queue is deleted; then logging in a node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted; according to the channel replacing instruction, a replacing channel is newly built, and the replacing channel is added to the node to be cleaned; and finally, acquiring first configuration information of the replacement channel, inquiring the resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information, and starting the resource exchange server. Compared with the prior art, the block chain data cleaning method capable of cleaning data in a block chain and improving the operation efficiency of the block chain is provided.
drawings
FIG. 1 is a diagram illustrating an exemplary implementation of a blockchain data cleaning method;
FIG. 2 is a flowchart illustrating a method for clearing blockchain data according to an embodiment;
FIG. 3 is a flow chart illustrating the detection of calibration data in data to be cleaned according to one embodiment;
FIG. 4 is a block diagram of an embodiment of a blockchain data cleaner;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The block chain data cleaning method provided by the application can be applied to the application environment shown in fig. 1. Therein, the server 102 communicates with the node to be cleaned 106 included in the blockchain system 104 through a network. The server 102 stops each node in the blockchain system 104 and the associated service corresponding to each node; when each node and service in the block chain stop, acquiring a sequencing identifier, acquiring sequencing service from the associated service according to the sequencing identifier, deleting a data queue in the sequencing service, and generating a data cleaning instruction when the data queue is deleted; then logging in the node 106 to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node 106 to be cleaned, restarting the associated service corresponding to the node 106 to be cleaned, and generating a channel replacement instruction when the associated service is restarted; according to the channel replacing instruction, a replacing channel is newly built, and the replacing channel is added to the node 106 to be cleaned; and finally, acquiring first configuration information of the replacement channel, inquiring the resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information, and starting the resource exchange server. The server 102 and the node 106 to be cleaned may be implemented by independent servers or a server cluster composed of a plurality of servers, and the block chain system 104 may be a distributed storage system including different nodes, may connect blocks generated by different nodes to form a block chain, and stores the formed block chain into different nodes.
In one embodiment, as shown in fig. 2, a method for clearing block chain data is provided, which is described by taking the method as an example applied to the server 102 in fig. 1, and includes the following steps:
Step 202, stopping each node in the block chain and the associated service corresponding to each node.
Specifically, each node and associated service in the blockchain may include: the system comprises a common identification node for sequencing data, a sequencing service associated with the common identification node, an endorsement node for verifying whether the data is legal, an endorsement service associated with the endorsement node, a data node for storing the data, a data storage service associated with the data node, a transaction node for initiating and stopping transactions, a transaction initiation service associated with the transaction node and the like, wherein the server stops the nodes and the associated services in a block chain and prepares for data cleaning in a subsequent block chain.
and 204, acquiring a sequencing identifier, acquiring a sequencing service from the associated service according to the sequencing identifier, deleting a data queue in the sequencing service, and generating a data cleaning instruction when the data queue is deleted.
Specifically, the ranking identifier is used to identify ranking services in the consensus node, such as kafka services connected by the consensus node, and the like. The data queue may be a data queue of test data to be cleaned, such as a topic (tag) in the kafka service, and the data cleaning instruction may be used to indicate the deletion of data to be cleaned in the node to be cleaned after the deletion of the data queue. The server obtains a sequencing identifier used for indicating a sequencing service, obtains the sequencing service connected with the consensus node according to the sequencing identifier, deletes a data queue in the sequencing service, and generates a data cleaning instruction.
and step 206, logging in the node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted.
Specifically, the nodes to be cleaned may include a consensus node, an endorsement node, and a data node in the block chain, and the data to be cleaned may be residual data for testing, such as channel data in the consensus node, ledger data in the endorsement node and the data node, transient data, and the like. After the server acquires the data cleaning instruction, logging in the node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, and restarting the associated service in the node to be cleaned after deleting the data to be cleaned in the node to be cleaned: the method can include the steps of identifying nodes and associated ordering services, endorsement nodes and associated endorsement services, data nodes and associated data storage services, and generating channel replacement instructions, wherein the channel replacement instructions are used for indicating the generation of replacement channels and the replacement of the replacement channels.
And step 208, creating a replacement channel according to the channel replacement instruction, and adding the replacement channel to the node to be cleaned.
Specifically, the replacement channel is used for replacing a block chain channel of an original data channel of the data to be cleaned, after the data to be cleaned is deleted, the original data channel where the data to be cleaned is located is correspondingly deleted, the specific building method of the block chain channel comprises the steps of entering a Docker cli container (a software package which is used for code processing, data operation and system setting in a block chain), then setting environment variables of the channel, adding channel related configuration data into the channel and the like, and after the block chain channel for replacement is newly built, adding the channel for replacement into the nodes to be cleaned, such as the common identification node, the endorsement node and the data node, which have been subjected to data cleaning.
Step 210, obtaining the first configuration information of the replacement channel and querying the resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information, and starting the resource exchange server.
Specifically, the first configuration information may be standard information of a replacement channel, such as information of a maximum transaction number, a maximum byte number, and the like, after the server acquires the first configuration information of the newly-built replacement channel, the server modifies the original channel configuration of the node to be cleaned according to the first configuration information, and queries the state of the resource exchange server, starts the resource exchange server if the resource exchange server is not started, and restarts the resource exchange server if the resource exchange server is in a started state.
In the block chain data cleaning method, the server stops each node in the block chain and the associated service corresponding to each node; when each node and service in the block chain stop, acquiring a sequencing identifier, acquiring sequencing service from the associated service according to the sequencing identifier, deleting a data queue in the sequencing service, and generating a data cleaning instruction when the data queue is deleted; then logging in a node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted; according to the channel replacing instruction, a replacing channel is newly built, and the replacing channel is added to the node to be cleaned; and finally, acquiring first configuration information of the replacement channel, inquiring the resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information, and starting the resource exchange server. Compared with the prior art, the block chain data cleaning method capable of cleaning data in a block chain and improving the operation efficiency of the block chain is provided.
in an embodiment, as shown in fig. 3, in the block chain data cleaning method, before deleting the data to be cleaned in the node to be cleaned, the method may further include:
Step 302, when calibration data exists in the data to be cleaned in the node to be cleaned, backing up the calibration data in the node to be cleaned.
Specifically, the calibration data is the restoration data in the data to be cleaned, the data to be cleaned which can be restored by the restoration data can be restored by restoring the data to be cleaned again when subsequent error correction or inspection is needed, the data to be cleaned is detected and corrected, the server detects whether the data to be cleaned contains the calibration data before deleting the data to be cleaned in the node to be cleaned, and when the server detects that the calibration data exists in the data to be cleaned in the node to be cleaned, the detected calibration data is stored and reserved as backup data for subsequent data inspection.
and 304, when the data inspection request is received, restoring the data to be cleaned in the nodes to be cleaned according to the backed-up calibration data.
specifically, when the server receives the data checking request, the data to be cleaned in the node to be cleaned is restored according to the calibration data in the backed-up data to be cleaned, so that a user can conveniently check the data to be cleaned before deletion, and check whether the data to be cleaned is abnormal or not.
In the block chain data cleaning method, the block chain data cleaning method detects whether the data to be cleaned contains the calibration data before the data is cleaned, stores the calibration data when the data to be cleaned contains the calibration data, and restores the data when a data inspection request is subsequently received, so that a user can conveniently search for errors in the block chain data.
In an embodiment, after acquiring the first configuration information of the replacement channel and querying the resource exchange server, the method for clearing blockchain data may further include: acquiring second configuration information of a history channel in the history record, and matching the second configuration information with the first configuration information; and when the matching is successful, starting the resource exchange server.
Specifically, the second configuration information refers to configuration information of a historical data channel in a history record, after the server acquires first configuration information of a replacement channel and queries the current state of the resource exchange server, second configuration information of the historical data channel in the history record in the block chain is queried, the first configuration information of the replacement channel is matched with the second configuration information in the history record, when the second configuration information in the history record is matched with the first configuration information of the replacement channel, it is indicated that the configurations of the second configuration information and the replacement channel are the same, and if the second configuration information of the history record meets the configuration requirement of the replacement channel, the step of modifying the channel configuration of the node to be cleaned according to the first configuration information is skipped, and the server is directly started.
in the embodiment, the server checks whether the configuration information matched with the first configuration information of the replacement channel exists or not by acquiring the second configuration information of the historical channel in the historical record, and when the configuration information exists, the channel configuration modification step can be directly skipped, so that the server resources are saved.
in an embodiment, the method for clearing block chain data to stop each node in the block chain and associated services corresponding to each node may include: receiving a data cleaning instruction sent by a terminal, wherein the data cleaning instruction comprises a terminal identifier; acquiring a cleaning authority terminal set, and detecting whether a terminal identifier is matched with a terminal identifier in the cleaning authority terminal set; and when the terminal identification is matched with the terminal identification in the clearing authority terminal set, stopping each node in the block chain and the associated service corresponding to each node. .
Specifically, the clearing authority terminal set is a fixed terminal, an authority list set such as an IP frequency band, and the like, and the terminal identifier is identification information of the data clearing sender terminal, and is included in the data clearing instruction and used for pointing to the data clearing sender terminal. The method comprises the steps that when a server receives a data cleaning instruction sent by a terminal, a terminal identifier contained in the data cleaning instruction is obtained, whether the terminal sending the data cleaning instruction is in a cleaning authority terminal set or not is detected through the terminal identifier, if the terminal sending the data cleaning instruction is in the cleaning authority terminal set, subsequent block chain data cleaning work is started, and namely all nodes in a block chain and associated services corresponding to all the nodes are stopped. In addition, if the terminal sending the data cleaning instruction is not in the cleaning authority terminal set, the identity of the terminal sending the cleaning instruction can be verified.
in this embodiment, the server starts the data cleaning work of the blockchain by detecting whether the terminal sending the data cleaning instruction is matched with the cleaning authority terminal set or not, and when the terminal sending the data cleaning instruction is matched with the cleaning authority terminal set, so that other users without authority are prevented from cleaning the blockchain data, and the safety of the blockchain data is ensured.
in an embodiment, the method for clearing block chain data to stop each node in the block chain and associated services corresponding to each node may include: acquiring the data volume of the data to be cleaned, and judging whether the data volume of the data to be cleaned is larger than a preset value or not; and when the data volume of the data to be cleaned is larger than a preset value, stopping each node in the block chain and the associated service corresponding to each node.
Specifically, the preset value may be a critical value, when the amount of data to be cleaned is greater than the critical value, the operation efficiency of the block chain is significantly reduced, the server detects the amount of data to be cleaned, and determines whether the detected amount of data is greater than the preset value, and when the amount of data to be cleaned is greater than the preset value, the server starts a subsequent block chain data cleaning operation, that is, stops each node in the block chain and associated services corresponding to each node. In addition, a preset period can be set, the server can periodically detect the data volume of the data to be cleaned according to the preset period, and the operation efficiency of the block chain is periodically ensured.
in this embodiment, the server starts the data cleaning operation of the block chain by detecting whether the data amount of the data to be cleaned is greater than the preset value or not, and when the data amount is greater than the preset value, the data cleaning operation can be performed when the data to be cleaned affects the operation efficiency, so that the operation efficiency of the block chain is ensured.
In an embodiment, in the block chain data cleaning method, the server cleans the data to be cleaned in the block chain by stopping each node and associated service in the block chain, deleting a data queue in the sequencing service, deleting the data to be cleaned in the node to be cleaned, newly building a replacement channel, restarting the resource exchange server, and the like. For example, a lot of test data are left in the block chain in the operation process due to data testing and the like, the test data lose effect after being tested, and the test data also affect the operation efficiency of the block chain when processing other data, the server stops each node in the block chain and associated services corresponding to each node, then obtains kafka service in the consensus node, deletes a data queue (topic) in the kafka service, then deletes the test data on the consensus node, the test data (ledger data and transient data) on the endorsement node and on the data node, then newly establishes a replacement channel, adds the replacement channel to the node from which the data is deleted, and starts the resource exchange server. Therefore, the data in the block chain is cleaned, and the block chain data cleaning method improves the block chain operation efficiency.
It should be understood that, although the steps in the flowcharts of fig. 2 and 3 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 3 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
in one embodiment, as shown in fig. 4, there is provided a block chain data cleaning apparatus, including: a stop module 402, a first obtaining module 404, a login module 406, a new channel module 408, and a second obtaining module 410, wherein:
a stopping module 402, configured to stop each node in the block chain and associated services corresponding to each node.
the first obtaining module 404 is configured to obtain the sorting identifier, obtain a sorting service from the associated service according to the sorting identifier, delete a data queue in the sorting service, and generate a data cleaning instruction when the data queue is deleted.
The login module 406 is configured to log in the node to be cleaned according to the data cleaning instruction, delete the data to be cleaned in the node to be cleaned, restart the associated service corresponding to the node to be cleaned, and generate a channel replacement instruction when the associated service is restarted.
And a new channel creating module 408, configured to create a new replacement channel according to the channel replacement instruction, and add the replacement channel to the node to be cleaned.
a second obtaining module 410, configured to obtain the first configuration information of the replacement channel and query the resource exchange server, modify the channel configuration of the node to be cleaned according to the first configuration information, and start the resource exchange server.
in one embodiment, the apparatus may further comprise:
And the backup module is used for backing up the calibration data in the node to be cleaned when the calibration data exists in the data to be cleaned in the node to be cleaned, and restoring the data to be cleaned in the node to be cleaned according to the backed-up calibration data when the data inspection request is received.
In one embodiment, the apparatus may further comprise:
And the third acquisition module is used for acquiring second configuration information of the historical channel in the historical record and matching the second configuration information with the first configuration information.
And the starting module is used for starting the resource exchange server when the matching is successful.
In one embodiment, the apparatus may further comprise:
And the receiving module is used for receiving a data cleaning instruction sent by the terminal, and the data cleaning instruction comprises a terminal identifier.
And the fourth acquisition module is used for acquiring the cleaning authority terminal set and detecting whether the terminal identification is matched with the terminal identification in the cleaning authority terminal set.
And the second stopping module is used for stopping each node in the block chain and the associated service corresponding to each node when the terminal identifier is matched with the terminal identifier in the clearing authority terminal set.
in one embodiment, the apparatus may further comprise:
and the fifth acquisition module is used for acquiring the data volume of the data to be cleaned and judging whether the data volume of the data to be cleaned is larger than a preset value or not.
And the third stopping module is used for stopping each node in the block chain and the associated service corresponding to each node when the data volume of the data to be cleaned is larger than a preset value.
for the specific definition of the block chain data cleaning apparatus, reference may be made to the above definition of the block chain data cleaning method, which is not described herein again. The modules in the block chain data cleaning device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store blockchain data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a block chain data cleaning method.
those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: stopping each node in the block chain and the associated service corresponding to each node; acquiring a sorting identifier, acquiring sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction when the data queue is deleted; logging in a node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted; according to the channel replacing instruction, a replacing channel is newly built, and the replacing channel is added to the node to be cleaned; and acquiring first configuration information of the replacement channel, inquiring the resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information, and starting the resource exchange server.
In one embodiment, before deleting the data to be cleaned in the node to be cleaned, which is realized when the processor executes the computer program, the method may further include: when calibration data exists in the to-be-cleaned data in the to-be-cleaned node, the calibration data in the to-be-cleaned node is backed up, and when a data inspection request is received, the to-be-cleaned data in the to-be-cleaned node is restored according to the backed-up calibration data.
In one embodiment, after the obtaining the first configuration information of the replacement channel and querying the resource exchange server when the processor executes the computer program, the method may further include: acquiring second configuration information of a history channel in the history record, and matching the second configuration information with the first configuration information; and when the matching is successful, starting the resource exchange server.
In one embodiment, the stopping of each node in the blockchain and the associated service corresponding to each node involved in the execution of the computer program by the processor may include: receiving a data cleaning instruction sent by a terminal, wherein the data cleaning instruction comprises a terminal identifier; acquiring a cleaning authority terminal set, and detecting whether a terminal identifier is matched with a terminal identifier in the cleaning authority terminal set; and when the terminal identification is matched with the terminal identification in the clearing authority terminal set, stopping each node in the block chain and the associated service corresponding to each node.
In one embodiment, the stopping of each node in the blockchain and the associated service corresponding to each node involved in the execution of the computer program by the processor may include: acquiring the data volume of the data to be cleaned, and judging whether the data volume of the data to be cleaned is larger than a preset value or not; and when the data volume of the data to be cleaned is larger than a preset value, stopping each node in the block chain and the associated service corresponding to each node.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: stopping each node in the block chain and the associated service corresponding to each node; acquiring a sorting identifier, acquiring sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction when the data queue is deleted; logging in a node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted; according to the channel replacing instruction, a replacing channel is newly built, and the replacing channel is added to the node to be cleaned; and acquiring first configuration information of the replacement channel, inquiring the resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information, and starting the resource exchange server.
In one embodiment, before deleting the to-be-cleaned data in the to-be-cleaned node, the computer program, when executed by the processor, may further include: when calibration data exists in the to-be-cleaned data in the to-be-cleaned node, the calibration data in the to-be-cleaned node is backed up, and when a data inspection request is received, the to-be-cleaned data in the to-be-cleaned node is restored according to the backed-up calibration data.
in one embodiment, after obtaining the first configuration information of the replacement channel and querying the resource exchange server, the computer program when executed by the processor may further include: acquiring second configuration information of a history channel in the history record, and matching the second configuration information with the first configuration information; and when the matching is successful, starting the resource exchange server.
In one embodiment, stopping each node in the blockchain and associated services corresponding to each node involved when the computer program is executed by the processor may include: receiving a data cleaning instruction sent by a terminal, wherein the data cleaning instruction comprises a terminal identifier; acquiring a cleaning authority terminal set, and detecting whether a terminal identifier is matched with a terminal identifier in the cleaning authority terminal set; and when the terminal identification is matched with the terminal identification in the clearing authority terminal set, stopping each node in the block chain and the associated service corresponding to each node.
In one embodiment, stopping each node in the blockchain and associated services corresponding to each node involved when the computer program is executed by the processor may include: acquiring the data volume of the data to be cleaned, and judging whether the data volume of the data to be cleaned is larger than a preset value or not; and when the data volume of the data to be cleaned is larger than a preset value, stopping each node in the block chain and the associated service corresponding to each node.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. a method of blockchain data scrubbing, the method comprising:
Stopping each node in the block chain and the associated service corresponding to each node;
acquiring a sorting identifier, acquiring a sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction when the data queue is deleted;
logging in a node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted;
according to the channel replacing instruction, a replacing channel is newly built, and the replacing channel is added to the node to be cleaned;
And acquiring first configuration information of the replacement channel, inquiring a resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information, and starting the resource exchange server.
2. The method according to claim 1, wherein before deleting the data to be cleaned in the node to be cleaned, further comprising:
when calibration data exists in the to-be-cleaned data in the to-be-cleaned node, the calibration data in the to-be-cleaned node is backed up, and when a data inspection request is received, the to-be-cleaned data in the to-be-cleaned node is restored according to the backed-up calibration data.
3. The method of claim 1, wherein after obtaining the first configuration information of the replacement channel and querying the resource exchange server, the method further comprises:
Acquiring second configuration information of a history channel in a history record, and matching the second configuration information with the first configuration information;
And when the matching is successful, starting the resource exchange server.
4. the method of claim 1, wherein stopping each node in the blockchain and associated services corresponding to each node comprises:
Receiving a data cleaning instruction sent by a terminal, wherein the data cleaning instruction comprises a terminal identifier;
Acquiring a clearing authority terminal set, and detecting whether the terminal identification is matched with the terminal identification in the clearing authority terminal set;
And when the terminal identification is matched with the terminal identification in the clearing authority terminal set, stopping each node in the block chain and the associated service corresponding to each node.
5. the method of claim 1, wherein stopping each node in the blockchain and associated services corresponding to each node comprises:
Acquiring the data volume of the data to be cleaned, and judging whether the data volume of the data to be cleaned is larger than a preset value or not;
and when the data volume of the data to be cleaned is larger than a preset value, stopping each node in the block chain and the associated service corresponding to each node.
6. an apparatus for clearing block chain data, the apparatus comprising:
The stopping module is used for stopping each node in the block chain and the associated service corresponding to each node;
the first acquisition module is used for acquiring a sorting identifier, acquiring sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction when the data queue is deleted;
The login module is used for logging in the node to be cleaned according to the data cleaning instruction, deleting the data to be cleaned in the node to be cleaned, restarting the associated service corresponding to the node to be cleaned, and generating a channel replacement instruction when the associated service is restarted;
A channel building module, configured to build a replacement channel according to the channel replacement instruction, and add the replacement channel to the node to be cleaned;
And the second acquisition module is used for acquiring the first configuration information of the replacement channel, inquiring the resource exchange server, modifying the channel configuration of the node to be cleaned according to the first configuration information and starting the resource exchange server.
7. The apparatus of claim 6, wherein the apparatus comprises:
The backup module is used for backing up the calibration data in the nodes to be cleaned when the calibration data exists in the data to be cleaned in the nodes to be cleaned, and restoring the data to be cleaned in the nodes to be cleaned according to the backed-up calibration data when a data inspection request is received.
8. the apparatus of claim 6, wherein the apparatus comprises:
the third acquisition module is used for acquiring second configuration information of a historical channel in a historical record and matching the second configuration information with the first configuration information;
And the starting module is used for starting the resource exchange server when the matching is successful.
9. a computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN201910675346.4A 2019-07-25 2019-07-25 block chain data cleaning method and device, computer equipment and storage medium Pending CN110555017A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910675346.4A CN110555017A (en) 2019-07-25 2019-07-25 block chain data cleaning method and device, computer equipment and storage medium
PCT/CN2019/121472 WO2021012562A1 (en) 2019-07-25 2019-11-28 Blockchain data cleaning method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910675346.4A CN110555017A (en) 2019-07-25 2019-07-25 block chain data cleaning method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110555017A true CN110555017A (en) 2019-12-10

Family

ID=68735910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910675346.4A Pending CN110555017A (en) 2019-07-25 2019-07-25 block chain data cleaning method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN110555017A (en)
WO (1) WO2021012562A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112995111A (en) * 2019-12-17 2021-06-18 中国移动通信集团河南有限公司 Block chain-based Internet of things security detection method, equipment, system and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783886B (en) * 2021-03-12 2023-08-29 中国平安财产保险股份有限公司 Cache cleaning method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018076867A1 (en) * 2016-10-25 2018-05-03 广东欧珀移动通信有限公司 Data backup deleting method, device and system, storage medium and server
CN108924250A (en) * 2018-07-27 2018-11-30 江西贪玩信息技术有限公司 Service request processing method, device and computer equipment based on block chain
CN109361664A (en) * 2018-10-11 2019-02-19 腾讯科技(深圳)有限公司 Data verification method, system and computer readable storage medium based on block chain
WO2019114128A1 (en) * 2017-12-13 2019-06-20 深圳壹账通智能科技有限公司 Block chain transaction block processing method, electronic device and readable storage medium
CN109922471A (en) * 2019-02-15 2019-06-21 广州供电局有限公司 Using remote data delet method, device, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11182781B2 (en) * 2014-06-16 2021-11-23 Bank Of America Corporation Block chain encryption tags
CN108596767B (en) * 2018-05-09 2021-11-02 中国工商银行股份有限公司 Block chain historical data cleaning method and device
CN109493044A (en) * 2018-11-08 2019-03-19 深圳壹账通智能科技有限公司 Block chain block delet method, device and terminal device
CN109542888B (en) * 2018-12-03 2020-12-01 百度在线网络技术(北京)有限公司 Data modification and synchronization method, device, equipment and storage medium of block chain
CN109995594B (en) * 2019-04-10 2022-06-24 广州致链科技有限公司 Block chain network resource management method, device and block chain system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018076867A1 (en) * 2016-10-25 2018-05-03 广东欧珀移动通信有限公司 Data backup deleting method, device and system, storage medium and server
WO2019114128A1 (en) * 2017-12-13 2019-06-20 深圳壹账通智能科技有限公司 Block chain transaction block processing method, electronic device and readable storage medium
CN108924250A (en) * 2018-07-27 2018-11-30 江西贪玩信息技术有限公司 Service request processing method, device and computer equipment based on block chain
CN109361664A (en) * 2018-10-11 2019-02-19 腾讯科技(深圳)有限公司 Data verification method, system and computer readable storage medium based on block chain
CN109922471A (en) * 2019-02-15 2019-06-21 广州供电局有限公司 Using remote data delet method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112995111A (en) * 2019-12-17 2021-06-18 中国移动通信集团河南有限公司 Block chain-based Internet of things security detection method, equipment, system and medium
CN112995111B (en) * 2019-12-17 2022-12-23 中国移动通信集团河南有限公司 Block chain-based Internet of things security detection method, equipment, system and medium

Also Published As

Publication number Publication date
WO2021012562A1 (en) 2021-01-28

Similar Documents

Publication Publication Date Title
CN110647438B (en) Event monitoring method and device, computer equipment and storage medium
CN110995468B (en) System fault processing method, device, equipment and storage medium of system to be analyzed
US10152382B2 (en) Method and system for monitoring virtual machine cluster
CN108897638B (en) Data backup method and device, computer equipment and storage medium
CN110928653B (en) Cross-cluster task execution method and device, computer equipment and storage medium
CN111324423B (en) Method and device for monitoring processes in container, storage medium and computer equipment
CN108255576B (en) Virtual machine live migration exception handling method and device and storage medium
CN111901176B (en) Fault determination method, device, equipment and storage medium
CN110555769A (en) Block chain transaction data processing method and device, computer equipment and storage medium
CN113296993A (en) Client log recovery method and device, computer equipment and storage medium
CN111611021A (en) Log data transmission method and device, computer equipment and storage medium
CN110555017A (en) block chain data cleaning method and device, computer equipment and storage medium
CN113965576A (en) Container-based big data acquisition method and device, storage medium and equipment
CN112132652B (en) Order information acquisition method and device, computer equipment and storage medium
CN112003895B (en) Cloud host evacuation method, device, equipment and storage medium in OpenStack cloud platform
CN112235128B (en) Transaction path analysis method, device, server and storage medium
CN110489208B (en) Virtual machine configuration parameter checking method, system, computer equipment and storage medium
CN113918407A (en) Method and device for managing service process and readable storage medium
CN110955647A (en) Database assistance method, database assistance device, computer equipment and storage medium
CN112015799B (en) ETL task execution method and device, computer equipment and storage medium
CN109240906B (en) Database configuration information adaptation method and device, computer equipment and storage medium
CN115328814B (en) Fault injection method, device, equipment and storage medium based on mirror pair
CN110647526B (en) Batch data processing method, device, computer equipment and storage medium
CN110737546B (en) Consistency snapshot checking method, device, equipment and storage medium
CN108377670A (en) A kind of method of processing business, service node, control node and distributed system

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
AD01 Patent right deemed abandoned

Effective date of abandoning: 20240322

AD01 Patent right deemed abandoned