Blockchain-based computer virus library distributed storage method and related device thereof

By using a blockchain-based distributed storage method and leveraging secure hashing algorithms and virus file indexes, the security and automation issues in computer virus database storage are resolved, achieving secure, transparent, and highly reliable storage of the virus database.

CN117950586BActive Publication Date: 2026-02-13CHINA RAILWAY ENG CONSULTING GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410009721.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2026-02-13
Estimated Expiration
2044-01-02

AI Technical Summary

Technical Problem

Existing computer virus databases suffer from insufficient security, susceptibility to tampering with virus samples, low levels of management automation, and a high risk of single points of failure.

Method used

A blockchain-based distributed storage method is adopted. The summary information of virus files is extracted and added to the chain through a secure hash algorithm. Combined with the virus file index and operation information, the virus files can be added to the database, deleted and updated. The anti-tampering characteristics of blockchain are used to ensure the security and consistency of the virus database, and high reliability is achieved through the synchronization mechanism of storage nodes.

Benefits of technology

It achieves security and transparency of the virus database, ensures the integrity and consistency of virus files, realizes automated management of virus samples and high system reliability, and avoids the risk of single point of failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117950586B_ABST
    Figure CN117950586B_ABST
Patent Text Reader

Abstract

The application provides a kind of computer virus library distributed storage method based on blockchain and its related device, it is related to distributed storage technical field, including any one storage node obtains the virus file reported by internet antivirus software, the virus file is stored in its disk array, and generates the summary information of the operation information and virus file of warehousing, operation information and the summary information of virus file are written into blockchain to generate new block;Any one storage node initiates a deletion request, and generates the summary information of the operation information and virus file to be deleted, after operation information and the summary information of virus file to be deleted are written into blockchain to generate new block, in the disk array of the storage node, virus file to be deleted is deleted, the present application is used to solve the technical problems that the warehousing management function of existing virus library is weak, the degree of automation is not high, and paralysis, data tampering and data loss exist.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of distributed storage, in particular to a computer virus library distributed storage method based on a block chain and a related device thereof. BACKGROUND

[0002] A computer virus refers to a set of computer instructions or program codes inserted by a person in a computer program to destroy computer functions or data, affect normal use of the computer, and be able to self-replicate. A computer virus library is used to collect various virus samples, analyze virus characteristic information, and predict virus development trends. As a kind of special data that needs to be stored, the current computer virus library has not been thoroughly considered for security, and there is a risk of virus sample tampering. The storage and management function of the existing virus library is weak, and the degree of automation is not high. In addition, the current virus library is independently constructed, which has the risk of paralysis or data loss, and cannot achieve high reliability. SUMMARY

[0003] The present application relates to the technical field of distributed storage, in particular to a computer virus library distributed storage method based on a block chain and a related device thereof.

[0004] In the first aspect, the present application provides a computer virus library distributed storage method based on a block chain, applied to a distributed storage system composed of a plurality of storage nodes, each storage node being connected to the Internet, comprising:

[0005] Obtaining a virus file reported by an Internet antivirus software, storing the virus file in a disk array of any storage node, and generating operation information for storage and summary information of the virus file, writing the operation information and the summary information of the virus file into a block chain to generate a new block, wherein the summary information of the virus file includes a virus file index and digest data of the virus file;

[0006] Initiating a deletion request by any storage node, and generating operation information for deletion and summary information of a virus file to be deleted, writing the operation information and the summary information of the virus file to be deleted into a block chain to generate a new block, and deleting the virus file to be deleted in the disk array of the storage node;

[0007] Importing a new virus file by any storage node and initiating an update request, generating deletion operation information and summary information of an original virus file, storage operation information and summary information of the new virus file, writing the deletion operation information and the summary information of the original virus file into a block chain to generate a new block, and writing the storage operation information and the summary information of the new virus file into a block chain to generate a new block;

[0008] The storage nodes monitor changes in the blockchain in real time and read new blocks, analyze the new blocks to obtain operation information and summary information of the virus files, and perform synchronization operations on the virus files.

[0009] In a second aspect, the application further provides a blockchain-based computer virus library distributed storage device, comprising:

[0010] The virus storage module is configured to obtain virus files reported by an Internet antivirus software, store the virus files in a disk array of any storage node, generate operation information and summary information of the virus files for storage, and write the operation information and the summary information of the virus files into a blockchain to generate a new block.

[0011] The virus deletion module is configured to initiate a deletion request by any storage node, generate operation information and summary information of a virus file to be deleted, write the operation information and the summary information of the virus file to be deleted into the blockchain to generate a new block, and delete the virus file to be deleted in the disk array of the storage node.

[0012] The virus update module is configured to import a new virus file by any storage node and initiate an update request, generate deletion operation information and summary information of an original virus file, storage operation information and summary information of the new virus file, write the deletion operation information and the summary information of the original virus file into the blockchain to generate a new block, and write the storage operation information and the summary information of the new virus file into the blockchain to generate a new block.

[0013] The storage node synchronization module is configured to monitor changes in the blockchain in real time by the storage nodes, read new blocks, analyze the new blocks to obtain operation information and summary information of virus files, and perform synchronization operations on the virus files.

[0014] In a third aspect, the application further provides a blockchain-based computer virus library distributed storage device, comprising:

[0015] The memory is configured to store a computer program.

[0016] The processor is configured to execute the computer program to implement the steps of the blockchain-based computer virus library distributed storage method.

[0017] In a fourth aspect, the application further provides a readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the blockchain-based computer virus library distributed storage method.

[0018] The application has the following beneficial effects:

[0019] 1、The application extracts virus file abstract information by applying a secure hash algorithm, and stores it into a block chain, thereby eliminating the risk of virus file tampering, and guaranteeing the safety and transparency of the virus library;

[0020] 2、The application proposes a virus warehousing, deletion and updating method of a single storage node, proposes a storage node structure suitable for virus file access, and realizes automatic management of virus samples; meanwhile, a distributed storage node synchronization method and a new node initialization method based on a block chain are proposed, thereby guaranteeing the real-time synchronization of the storage nodes of the system;

[0021] 3、The application proposes a networked virus file access method, which compares the operation type consistency, file index consistency and file abstract consistency based on a block chain, and ensures the integrity of the accessed virus file.

[0022] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the application as claimed. The objects and other advantages of the present application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments, and it should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0024] Figure 1 The figure is a structure diagram of a computer virus library distributed storage system in the embodiments of the present application;

[0025] Figure 2 The figure is a flowchart of a computer virus library distributed storage method based on a block chain in the embodiments of the present application;

[0026] Figure 3 The figure is a structure diagram of a block in the embodiments of the present application;

[0027] Figure 4 The figure is a structure diagram of a computer virus library distributed storage device based on a block chain in the embodiments of the present application;

[0028] Figure 5 The figure is a structure diagram of a computer virus library distributed storage device based on a block chain in the embodiments of the present application;

[0029] Markings in the figure:

[0030] 800, a blockchain-based computer virus library distributed storage device; 801, a processor; 802, a memory; 803, a multimedia component; 804, an I / O interface; 805, a communication component. DETAILED DESCRIPTION

[0031] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor fall within the scope of protection of the present application.

[0032] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0033] Embodiment 1

[0034] Referring to Figure 1 The present embodiment provides a blockchain-based computer virus library distributed storage method, which is applied to a distributed storage system composed of a plurality of storage nodes, the system can contain at most 1024 storage nodes, and each storage node accesses the Internet; each storage node is identified by a different ID, and the ID occupies 10 bits.

[0035] Referring to Figure 2 The present method includes:

[0036] S1. Any storage node obtains a virus file reported by an Internet antivirus software, stores the virus file into its disk array, and generates operation information and summary information of the virus file, writes the operation information and the summary information of the virus file into a blockchain to generate a new block, wherein the summary information of the virus file includes a virus file index and digest data of the virus file;

[0037] Specifically, the step S1 includes:

[0038] S11. Obtain a virus file and description information of the virus file reported by an Internet antivirus software, wherein the virus description information includes a virus existence form, a propagation mode, a corresponding operating system, and a collection time, etc., and is used for display and retrieval, and the virus file includes executable virus code, a document file infected by a virus, a data file embedded with a virus, and a source code file containing a virus, etc.

[0039] S12. Extract summary data of the virus file by a current storage node;

[0040] Specifically, the summary information of the virus file is extracted by using a secure hash algorithm. The secure hash algorithm uses a short information as a uniqueness mark of an original file, and the mark is related to each byte of the file, and it is difficult to find a reverse rule. The secure hash algorithm used in the present application is SHA256 algorithm, and a 256-bit hash value is extracted for each virus file. After the virus summary information is entered into the chain, based on the tamper-proofing feature of the blockchain, the integrity of the virus sample file can be ensured by checking the summary information.

[0041] S13. Verify the virus file based on the description information and the summary data of the virus file, and determine whether the preset contract condition is met;

[0042] The contract condition is:

[0043] 1) Determine whether the description information of the virus file includes a virus existence form, a propagation mode, a corresponding operating system, and a collection time:

[0044] If not, the contract condition is not met;

[0045] 2) Otherwise, compare the summary data of the virus file with each summary data stored in the blockchain to determine whether they are the same:

[0046] If yes, it means that the current virus file already exists, and the contract condition is not met;

[0047] Otherwise, the preset contract condition is met.

[0048] If the preset contract condition is not met, the storage operation is abandoned;

[0049] S14. Otherwise, generate a storage operation, store the virus file in a disk array of the current storage node, construct a virus library, and return a virus file index;

[0050] Specifically, all virus files are stored in the disk array in a compression file in a predetermined format, and the disk array can realize high-speed access and redundancy protection of the virus files;

[0051] Specifically, the virus file index is a fixed-length numerical sequence, and the corresponding virus file can be downloaded from any storage node of the distributed storage system according to the virus file index. The virus file index in the application is composed of a node ID and a file serial number, wherein the node ID corresponds to the node of the virus storage initiator, and the file serial number is generated by the virus storage initiator node and can be agreed to be an increasing sequence starting from 0. The index length in the application is set to 220 bits, wherein the storage node ID occupies 10 bits, and the file serial number occupies 210 bits.

[0052] S15. Verify the legality of the warehousing operation and the virus file index, such as whether the node ID value is consistent with the current node or not:

[0053] If it is legal, the operation information is composed of a preset identifier, a warehousing operation and a current storage node ID, and sequentially passes through the steps of signature, signature verification, block packaging, block broadcast and block hash value generation, etc. The operation information, the virus file index and the virus file digest are written into the block chain to generate a new block, and the hash value of the new block is sent to the current storage node, wherein the hash value of the block is used to identify the block address associated with the virus in the block chain.

[0054] Specifically, the identifier is a fixed-length and content numerical sequence, indicating that the current block records the virus sample information. In addition to the above-mentioned warehousing operation, there are also deletion operation and update operation. In the application, the identifier occupies 24 bits, the operation type occupies 2 bits, and the node ID occupies 10 bits.

[0055] In summary, due to the diverse formats of viruses and the large size of some files, the application does not directly store the original virus file on the block chain, but stores the operation information, the virus file index and the virus file digest to form the block body numerical sequence of the block, so as to realize the virus file synchronization and tamper-proof function of each node.

[0056] Each block of the block chain is composed of a block header and a block body, the block header contains the hash value connected to the previous block, and the block body is used to store the virus file information, such as Figure 3 When the virus processing result is entered into the chain, the cryptographically signed processing information is first packaged into a block to form a distributed digital ledger, and then the processing information is recorded in the next block to be entered into the chain of the block chain after digital signature confirmation.

[0057] And the virus description information, the corresponding block hash value and the virus file are stored in the disk array of the storage node.

[0058] Based on the above embodiment, the method comprises:

[0059] S2. A deletion request is initiated by any one storage node, and operation information of deletion and summary information of the virus file to be deleted are generated, the operation information and the summary information of the virus file to be deleted are written into the blockchain to generate a new block, and the virus file to be deleted is deleted in the disk array of the storage node;

[0060] Specifically, the step S2 includes:

[0061] S21. The current storage node selects the virus file to be deleted stored in the disk array thereof, and initiates a deletion request. Specifically, an administrator logs in the current storage node, selects the virus file to be deleted, and initiates a deletion request. It should be noted that a general administrator can only delete the virus file created by the current node, and a super administrator can delete all virus files of the current system.

[0062] S22. The virus file index is obtained from the deletion request, the virus file to be deleted is extracted from the disk array according to the virus file index, and the corresponding block is found from the blockchain according to the block hash value.

[0063] S23. The summary data is extracted from the virus file to be deleted, the stored summary data is extracted from the block, and the consistency of the summary data of the virus file to be deleted and the stored summary data is compared.

[0064] If the consistency is not consistent, the administrator is prompted that the current virus data is tampered, and the deletion operation is abandoned.

[0065] S24. Otherwise, the operation information is composed of a preset identifier, a deletion operation and a current storage node ID, and the legality of the operation information and the virus file index is verified.

[0066] S25. If it is legal, the operation information, the summary data of the virus file to be deleted and the virus file index are written into the blockchain to generate a new block through the steps of signature, signature verification, block packaging, block broadcast and block hash value generation in sequence.

[0067] Based on the above embodiment, the method includes:

[0068] S3. A new virus file is imported by any one storage node, and an update request is initiated, the deletion operation information and the summary information of the original virus file, and the storage operation information and the summary information of the new virus file are generated, the deletion operation information and the summary information of the original virus file are written into the blockchain to generate a new block, and the storage operation information and the summary information of the new virus file are written into the blockchain to generate a new block.

[0069] Specifically, the virus update is initiated by a person, and the essence can be divided into two steps of original virus deletion and new virus warehousing, wherein the new virus is imported by a person.

[0070] The step S3 comprises:

[0071] S31. The administrator logs in the current node, selects a virus file to be updated, imports a new virus file through a U disk or a network mode, and initiates an update request. An ordinary administrator can only update the virus file created by the current node, and a super administrator can update all virus files of the current system.

[0072] S32. The virus file index is obtained from the update request, the original virus file and the block hash value are extracted from the disk array according to the virus file index, and the corresponding block is found out from the block chain;

[0073] S33. The summary data is extracted from the original virus file, the stored summary data is extracted from the block, and the consistency of the summary data of the original virus file and the stored summary data is compared:

[0074] If the consistency is not consistent, the administrator is prompted that the current virus data is tampered with, and the update operation is abandoned;

[0075] S34. Otherwise, the summary data of the new virus file is extracted, the summary data of the new virus file is compared with each summary data stored in the block chain, and whether they are the same is judged:

[0076] If yes, the preset contract condition is not met, and the update operation is abandoned;

[0077] S35. Otherwise, the preset contract condition is met, the operation information is composed of the preset identifier, the deletion operation and the current storage node ID, and the legality of the operation information and the virus file index is verified;

[0078] S36. If it is legal, the operation information, the original virus file index and the original virus file summary are written into the block chain to generate a new block, and the hash value of the new block is sent to the current storage node;

[0079] S37. The operation information is composed of the preset identifier, the update operation and the current storage node ID, and the legality of the operation information and the new virus file index is verified;

[0080] S38. If it is legal, the operation information, the new virus file index and the new virus file summary are written into the block chain to generate a new block, and the hash value of the new block is sent to the current storage node.

[0081] Based on the above embodiment, the method comprises:

[0082] S4. Each storage node monitors the change information of the block chain in real time and reads a new block, analyzes the operation information and the summary information of the virus file from the new block, and performs a synchronization operation on the virus file;

[0083] Specifically, the step S4 comprises:

[0084] S41. Obtain the new block, and compare the consistency with the preset identifier:

[0085] If inconsistent, abandon the synchronization operation;

[0086] S42. Otherwise, parse the new block to obtain the stored operation, storage node ID, virus file index and summary data, wherein the stored operation is a storage operation, a deletion operation or an update operation;

[0087] S43. Determine whether the extracted storage node ID is consistent with the current storage node ID:

[0088] If consistent, abandon the synchronization operation;

[0089] Otherwise, each storage node performs a virus file synchronization operation according to the obtained virus file index and the summary data of the virus file.

[0090] 1) When the stored operation is storage or update, download the virus file and its description information according to the virus file index and the storage node ID;

[0091] Extract the summary data of the downloaded virus file, and compare the consistency of the summary data of the downloaded virus file with the stored summary data:

[0092] If inconsistent, stop processing;

[0093] Otherwise, send the downloaded virus file and its description information, and the new block hash value to the current storage node, store them in the current storage node, and set the index information to the extracted index value.

[0094] 2) When the stored operation is deletion, set the corresponding virus record information to an invalid state according to the virus file index, and delete the virus file from the disk array.

[0095] Based on the above embodiment, since the virus libraries of each node are kept synchronized through the blockchain, if any storage node is removed or damaged, the system will not be affected.

[0096] Therefore, the method further includes initializing a storage node newly accessing the system:

[0097] Let each piece of virus record to be downloaded s be a triple containing a block hash value, a virus file index and a virus file summary, the set of all virus records to be downloaded be S, and the length of the blockchain be p;

[0098] S6. The new storage node starts from the beginning of the blockchain, reads the information of each block in turn, and performs the following processing for the i-th block B i , 1≤i≤p:

[0099] S61. Read the block B i and its block number sequence;

[0100] S62. Determine whether the identifier in the block number sequence is identical to the preset identifier:

[0101] If not, read the i+1th block and jump to step S61;

[0102] S63. Otherwise, parse the block number sequence to obtain operation information, virus file index and digest data, wherein the operation information is a storage operation, an update operation or a deletion operation;

[0103] When the storage operation or the update operation is performed, add the hash value, the virus file index and the digest data of the block B i to the set S as a piece of virus record to be downloaded;

[0104] When the deletion operation is performed, find the virus record to be downloaded in the set S according to the virus file index, and delete the virus record to be downloaded.

[0105] When the information of all blocks is read, the set S is created, and the set S contains k pieces of virus record to be downloaded.

[0106] S7. The new node selects any online storage node, and creates a virus library according to the records in the set S, and for the jth piece of virus record to be downloaded, 1≤j≤k, the following processing is sequentially performed:

[0107] S71. According to the virus file index in the virus record to be downloaded, download the virus file and its virus description information from the online storage node;

[0108] S72. Extract the digest data of the downloaded virus file, and compare the consistency of the digest data with the record:

[0109] If consistent, store the virus file, the virus description information and the block hash value in the ternary group in the disk array, and set the corresponding virus file index as the virus file index in the ternary group;

[0110] If not consistent, discard the record, read the j+1th piece of virus record to be downloaded, and jump to step S71.

[0111] When the k pieces of virus record to be downloaded in the set S are read, the new storage node is initialized, and the virus library is created.

[0112] Embodiment 2

[0113] The user accesses any storage node in the system through a browser or special software, finds the required virus information, and downloads the corresponding virus file.

[0114] Based on the above embodiments, the method also provides a virus file access method, comprising:

[0115] S1. After receiving the access request of the user, the selected storage node sends the virus file index and initiates a download request;

[0116] S2. Download the virus file, virus description information, and block hash value according to the virus file index;

[0117] S3. Extract the digest of the virus file from the virus file;

[0118] S4. According to the block hash value, find the corresponding block in the block chain. If there is no corresponding block, refuse access and issue a warning;

[0119] S5. Otherwise, extract the stored operation information, virus file index, and digest data from the block body;

[0120] S6. In turn, determine whether the extracted operation information is warehousing or updating, whether the virus file index is consistent with the virus file index in step S1, and whether the digest data is consistent with the digest data in step S3:

[0121] S7. If all conditions are met, send the virus file and virus description information to the user; otherwise, refuse access and issue a warning.

[0122] Embodiment 3:

[0123] Please refer to Figure 4 The embodiment provides a distributed storage device of a computer virus library based on a block chain, which comprises:

[0124] A virus warehousing module is used for obtaining a virus file reported by an Internet antivirus software, storing the virus file in a disk array of any storage node, generating operation information of warehousing and summary information of the virus file, and writing the operation information and the summary information of the virus file into a block chain to generate a new block, wherein the summary information of the virus file comprises a virus file index and digest data of the virus file;

[0125] A virus deletion module is used for initiating a deletion request by any storage node, generating operation information of deletion and summary information of a virus file to be deleted, writing the operation information and the summary information of the virus file to be deleted into a block chain to generate a new block, and deleting the virus file to be deleted in the disk array of the storage node;

[0126] virus updating module: for importing a new virus file by any one of the storage nodes and initiating an updating request, generating deletion operation information and summary information of an original virus file, updating operation information and summary information of the new virus file, writing the deletion operation information and summary information of the original virus file into the blockchain to generate a new block, and then writing the updating operation information and summary information of the new virus file into the blockchain to generate a new block;

[0127] storage node synchronizing module: for each storage node to monitor change information of the blockchain in real time and read a new block, analyze the new block to obtain operation information and summary information of a virus file, and perform a synchronization operation on the virus file.

[0128] Based on the above embodiment, the virus warehousing module comprises:

[0129] first acquisition unit: for acquiring a virus file and description information of the virus file reported by an Internet antivirus software;

[0130] first abstract extraction unit: for extracting abstract data of the virus by a current storage node, verifying the virus file based on the description information of the virus file and the abstract data, and determining whether a preset contract condition is met:

[0131] If not, the warehousing operation is abandoned;

[0132] Otherwise, a warehousing operation is generated, the virus file is stored in a disk array of the current storage node, and a virus file index is returned;

[0133] first verification unit: for verifying legality of the warehousing operation and the virus file index:

[0134] first smart contract unit: if legal, operation information is formed by a preset identifier, the warehousing operation and an ID of the current storage node, the operation information, abstract data of the virus file and the virus file index are written into the blockchain to generate a new block, and a hash value of the new block is sent to the current storage node.

[0135] Based on the above embodiment, the abstract extraction unit comprises:

[0136] first judgment unit: for judging whether the description information of the virus file includes a virus existence form, a propagation mode, a corresponding operating system and a collection time:

[0137] If not, the contract condition is not met;

[0138] second judgment unit: for comparing the abstract data of the virus file with each abstract data already stored in the blockchain to determine whether they are the same:

[0139] If yes, the contract condition is not met;

[0140] Otherwise, the preset contract condition is met.

[0141] Based on the above embodiment, the virus deletion module comprises:

[0142] The selected unit is used for the current storage node to select the virus file to be deleted stored in the disk array thereof and initiate a deletion request;

[0143] The second acquisition unit is used for acquiring the virus file index from the deletion request, extracting the virus file to be deleted and the block hash value from the disk array according to the virus file index, and acquiring the block corresponding to the virus file to be deleted according to the block hash value;

[0144] The second abstract extraction unit is used for extracting the abstract data from the virus file to be deleted and extracting the stored abstract data from the block; and comparing the abstract data of the virus file to be deleted with the stored abstract data for consistency:

[0145] If the consistency is not met, the administrator is prompted that the current virus data is tampered with, and the deletion operation is abandoned;

[0146] The second verification unit is composed of a preset identifier, a deletion operation and a current storage node ID to form operation information, and verifies the legality of the operation information and the virus file index;

[0147] The second smart contract unit writes the operation information, the abstract data of the virus file to be deleted and the virus file index into the blockchain to generate a new block if the legality is met.

[0148] Based on the above embodiment, the storage node synchronization module comprises:

[0149] The third acquisition unit is used for acquiring the identifier of the new block and the identifiers of other blocks in the blockchain, and comparing the consistency of the identifiers:

[0150] If the consistency is not met, the synchronization operation is abandoned;

[0151] The analysis unit analyzes the new block to obtain the stored operation, the storage node ID, the virus file index and the abstract data thereof, and the stored operation is a warehousing operation, an update operation or a deletion operation;

[0152] The third judgment unit is used for judging whether the extracted storage node ID is consistent with the current storage node ID:

[0153] If the consistency is met, the virus file synchronization operation is abandoned;

[0154] Otherwise, each storage node performs a virus file synchronization operation according to the obtained virus file index and the abstract data of the virus file.

[0155] When the stored operation is warehousing or updating, it comprises:

[0156] downloading the virus file and its description information according to the index and the extracted storage node ID of the virus file;

[0157] extracting the digest data of the downloaded virus file, and comparing the consistency of the digest data of the downloaded virus file with the stored digest data;

[0158] if the consistency is not the same, stopping the processing;

[0159] otherwise, sending the downloaded virus file and its description information, the new block hash value to the current storage node, storing the virus file by the current storage node, and setting the index information as the extracted index value.

[0160] when the operation of the storage is deletion, comprising:

[0161] according to the virus file index, setting the corresponding virus record information to an invalid state, and deleting the virus file from the disk array.

[0162] It should be noted that, as for the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be described in detail here.

[0163] Embodiment 4:

[0164] Corresponding to the above method embodiment, the present embodiment also provides a blockchain-based computer virus library distributed storage device. The blockchain-based computer virus library distributed storage device described below can be mutually corresponding with reference to the blockchain-based computer virus library distributed storage method described above.

[0165] Figure 5 is a block diagram of a blockchain-based computer virus library distributed storage device 800 according to an exemplary embodiment. As shown in Figure 5 the blockchain-based computer virus library distributed storage device 800 can include a processor 801, a memory 802. The blockchain-based computer virus library distributed storage device 800 can also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.

[0166] The processor 801 is configured to control overall operations of the blockchain-based computer virus library distributed storage device 800 to complete all or part of the steps in the above-described blockchain-based computer virus library distributed storage method. The memory 802 is configured to store various types of data to support operations of the blockchain-based computer virus library distributed storage device 800, which can include, for example, instructions for any application or method operating on the blockchain-based computer virus library distributed storage device 800, and application-related data, such as contact data, sent and received messages, pictures, audio, video, and the like. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 803 can include a screen and an audio component. The screen can be, for example, a touch screen, and the audio component is configured to output and / or input audio signals. For example, the audio component can include a microphone configured to receive external audio signals. The received audio signals can be further stored in the memory 802 or transmitted through the communication component 805. The audio component also includes at least one speaker configured to output audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, which can be a keyboard, a mouse, a button, and the like. The buttons can be virtual buttons or physical buttons. The communication component 805 is configured to perform wired or wireless communication between the blockchain-based computer virus library distributed storage device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, near field communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include a Wi-Fi module, a Bluetooth module, an NFC module.

[0167] In an example embodiment, the blockchain-based computer virus library distributed storage device 800 can be implemented by one or more Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic elements for executing the above-described blockchain-based computer virus library distributed storage method.

[0168] In another example embodiment, a computer readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the above-described blockchain-based computer virus library distributed storage method. For example, the computer readable storage medium can be the above-described memory 802 including program instructions, which can be executed by the processor 801 of the blockchain-based computer virus library distributed storage device 800 to complete the above-described blockchain-based computer virus library distributed storage method.

[0169] Embodiment 5:

[0170] Corresponding to the above method embodiments, the present embodiment also provides a readable storage medium, and the readable storage medium described below can be referred to in correspondence with the above-described blockchain-based computer virus library distributed storage method.

[0171] A readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implements the steps of the above-described blockchain-based computer virus library distributed storage method of the method embodiments.

[0172] The readable storage medium can be specifically a U disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various readable storage media that can store program codes.

[0173] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0174] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A blockchain-based distributed storage method for computer virus databases, applied to a distributed storage system, wherein the distributed storage system consists of several storage nodes, each connected to the Internet, characterized in that... include: Any storage node obtains a virus file reported by an internet antivirus software, stores the virus file in its disk array, generates storage operation information and virus file summary information, writes the operation information and virus file summary information into the blockchain to generate a new block, wherein the virus file summary information includes a virus file index and virus file summary data. A deletion request is initiated by any storage node, and deletion operation information and summary information of the virus file to be deleted are generated. After the operation information and summary information of the virus file to be deleted are written into the blockchain to generate a new block, the virus file to be deleted is deleted from the disk array of the storage node. A new virus file can be imported by any storage node and an update request can be initiated to generate deletion operation information and summary information of the original virus file, update operation information and summary information of the new virus file, write the deletion operation information and summary information of the original virus file into the blockchain to generate a new block, and write the update operation information and summary information of the new virus file into the blockchain to generate a new block. Each storage node monitors the changes in the blockchain in real time and reads new blocks, parses the new blocks to obtain operation information and summary information of the virus file, and performs synchronization operations on the virus file; Acquire a new storage node for the system. The new storage node starts from the beginning of the blockchain and reads the information of each block in sequence to create a set S containing k virus records to be downloaded. The new storage node selects any online storage node, reads k virus records to be downloaded from set S, and completes the initialization of the new storage node.

2. The distributed storage method for a computer virus database based on blockchain according to claim 1, characterized in that... Any storage node retrieves a virus file reported by an internet antivirus software, stores the virus file in its disk array, generates storage operation information and a summary of the virus file, and writes the operation information and the summary of the virus file into the blockchain to generate a new block, including: Obtain virus files and their descriptions reported by internet antivirus software; The virus's summary data is extracted from the current storage node. Based on the virus file's description information and summary data, the virus file is examined to determine whether it meets the preset contract conditions. If the conditions are not met, the data entry operation will be abandoned. Otherwise, generate an ingestion operation, store the virus file in the disk array of the current storage node, and return the virus file index; Verify the legitimacy of the data import operation and the virus file index: If valid, the operation information consists of a preset identifier, the database entry operation, and the current storage node ID. The operation information, the virus file index, and the virus file summary data are written into the blockchain to generate a new block, and the hash value of the new block is sent to the current storage node.

3. The distributed storage method for a computer virus database based on blockchain according to claim 1, characterized in that... A deletion request is initiated by any storage node, generating deletion operation information and a summary of the virus file to be deleted. After writing the operation information and the summary of the virus file to be deleted into the blockchain to generate a new block, the virus file to be deleted is then deleted from the disk array of the storage node, including: The current storage node selects the virus file to be deleted stored in its disk array and initiates a deletion request; Obtain the virus file index from the deletion request, extract the virus file to be deleted and the block hash value from the disk array based on the virus file index, and obtain the block corresponding to the virus file to be deleted based on the block hash value; Extract digest data from the virus file to be deleted, and extract the stored digest data from the blocks; compare the consistency between the digest data of the virus file to be deleted and the stored digest data. If there is a discrepancy, the administrator will be prompted that the current virus data has been tampered with, and the deletion operation will be abandoned. Otherwise, the operation information consists of a preset identifier, the deletion operation, and the current storage node ID, and the operation information is verified to be valid against the virus file index. If the operation is legitimate, the operation information, the virus file index, and the summary data of the virus file to be deleted will be written into the blockchain to generate a new block.

4. The distributed storage method for a computer virus database based on blockchain according to claim 1, characterized in that... Each storage node monitors blockchain changes in real time and reads new blocks. It then parses these new blocks to obtain operation information and a summary of the virus file, performing synchronization operations on the virus file, including: Obtain the identifier of the new block and compare its consistency with the preset identifier: If there is a discrepancy, the synchronization operation is abandoned; Otherwise, the new block is parsed to obtain its stored operations, storage node ID, virus file index, and virus file summary data. The stored operations are either insertion, deletion, or update. Determine if the extracted storage node ID matches the current storage node ID: If they match, then abandon the synchronization operation; Otherwise, each storage node performs virus file synchronization operations based on the obtained virus file index and virus file summary data.

5. A blockchain-based distributed storage device for computer virus databases, used in the blockchain-based distributed storage method for computer virus databases as described in any one of claims 1 to 4, characterized in that, include: Virus entry module: Any storage node obtains the virus file reported by the Internet antivirus software, stores the virus file in its disk array, generates entry operation information and virus file summary information, writes the operation information and virus file summary information into the blockchain to generate a new block, wherein the virus file summary information includes virus file index and virus file summary data. Virus deletion module: It is used to initiate a deletion request by any storage node, generate deletion operation information and summary information of the virus file to be deleted, write the operation information and summary information of the virus file to be deleted into the blockchain to generate a new block, and then delete the virus file to be deleted from the disk array of the storage node. Virus update module: Used to import new virus files from any storage node and initiate update requests, generate deletion operation information and summary information of the original virus file, storage operation information and summary information of the new virus file, write the deletion operation information and summary information of the original virus file into the blockchain to generate a new block, and write the storage operation information and summary information of the new virus file into the blockchain to generate a new block. Storage node synchronization module: Used by each storage node to monitor changes in the blockchain in real time and read new blocks, parse the new blocks to obtain operation information and summary information of virus files, and perform synchronization operations on virus files.

6. The distributed storage device for a computer virus database based on blockchain according to claim 5, characterized in that, The virus database entry module includes: First acquisition unit: used to acquire virus files and their descriptions reported by internet antivirus software; First digest extraction unit: Used to extract virus digest data from the current storage node, and to examine the virus file based on its description information and digest data to determine whether it meets the preset contract conditions. If the conditions are not met, the data entry operation will be abandoned. Otherwise, generate an ingestion operation, store the virus file in the disk array of the current storage node, and return the virus file index; First verification unit: Used to verify the legitimacy of the database insertion operation and the virus file index. First smart contract unit: If valid, the operation information consists of a preset identifier, an entry operation, and the current storage node ID. The operation information, the summary data of the virus file, and the virus file index are written into the blockchain to generate a new block, and the hash value of the new block is sent to the current storage node.

7. The distributed storage device for a computer virus database based on blockchain according to claim 5, characterized in that, The virus removal module includes: Selected Unit: The current storage node selects the virus file to be deleted stored in its disk array and initiates a deletion request; The second acquisition unit is used to acquire the virus file index from the deletion request, extract the virus file to be deleted and the block hash value from the disk array according to the virus file index, and acquire the block corresponding to the virus file to be deleted according to the block hash value. The second digest extraction unit is used to extract digest data from the virus file to be deleted, extract stored digest data from the blocks, and compare the consistency between the digest data of the virus file to be deleted and the stored digest data. If there is a discrepancy, the administrator will be prompted that the current virus data has been tampered with, and the deletion operation will be abandoned. The second verification unit consists of operation information composed of a preset identifier, deletion operation, and the current storage node ID, and verifies the legality of the operation information and the virus file index. The second smart contract unit: If valid, it writes the operation information, the summary data of the virus file to be deleted, and the virus file index into the blockchain to generate a new block.

8. The distributed storage device for a computer virus database based on blockchain according to claim 5, characterized in that, The storage node synchronization module includes: The third acquisition unit: used to obtain the identifier of the new block and compare it with the identifiers of other blocks in the blockchain, and to verify the consistency of the identifiers. If there is a discrepancy, the synchronization operation is abandoned; Parsing Unit: Parses the new block to obtain its storage operations, storage node ID, virus file index and summary data. Its storage operations are insertion, deletion or update operations. The third judgment unit is used to determine whether the extracted storage node ID matches the current storage node ID. If they match, then abandon the synchronization operation; Otherwise, each storage node performs virus file synchronization operations based on the obtained virus file index and virus file summary data.

9. A distributed storage device for a computer virus database based on blockchain, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the blockchain-based distributed storage method for computer virus databases as described in any one of claims 1 to 4 when executing the computer program.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the blockchain-based distributed storage method for computer virus databases as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Database auditing method and device based on block chain

    CN108446407A

  • Internet of things data management method, platform and device

    CN108694330A